package com.cratos.xxgram.platf.friend;

import javax.persistence.*;
import com.cratos.xxgram.platf.base.BaseEntity;
import org.redkale.util.Comment;

/**
 *
 * @author zhangjx
 */
@Table(comment = "申请好友表")
public class FriendAsk extends BaseEntity {

    @Comment("同意")
    public static transient final short ACCEPT = 10;
    
    @Comment("拒绝")
    public static transient final short REJECT = 20;
    
    @Comment("忽略")
    public static transient final short IGNORE = 30;
    
    @Comment("未处理")
    public static transient final short UNDO = 0;
    
    @Id
    @Column(length = 64, comment = "userid+“-”+friendid+“-”+create36time ")
    private String friendaskid = "";

    @Column(comment = "用户ID")
    private int userid;

    @Column(comment = "被邀好友ID")
    private int friendid;

    @Column(comment = "申请好友方式; 10:手机搜索; 20:扫二维码;")
    private short invitetype;

    @Column(updatable = false, comment = "申请好友时间")
    private long createtime;
    
    @Column(comment = "验证申请消息内容")
    private String verifymessage = "";

    @Column(comment = "应答结果; 0 未处理 10:同意; 20:拒绝;30忽略;")
    private short answer = UNDO;

    @Column(comment = "申请人名称;")
    private String askusername = "";
    
    @Column(comment = "申请人头像;")
    private String askuserface = "";

    @Comment("未读")
    public static transient final short UNREAD_STATUS = 10;
     
    @Comment("已读")
    public static transient final short READ_STATUS = 20;
      
    @Column(comment = "消息读取状态 10 未读  20 已读")
    private short readstatus = UNREAD_STATUS;

    public short getReadstatus() {
        return readstatus;
    }

    public void setReadstatus(short readstatus) {
        this.readstatus = readstatus;
    }
    
    public String getAskusername() {
        return askusername;
    }

    public void setAskusername(String askusername) {
        this.askusername = askusername;
    }

    public String getAskuserface() {
        return askuserface;
    }

    public void setAskuserface(String askuserface) {
        this.askuserface = askuserface;
    }

    public short getAnswer() {
        return answer;
    }

    public void setAnswer(short answer) {
        this.answer = answer;
    }
    
    public String getVerifymessage() {
        return verifymessage;
    }

    public void setVerifymessage(String verifymessage) {
        this.verifymessage = verifymessage;
    }
    
    public void setFriendaskid(String friendaskid) {
        this.friendaskid = friendaskid;
    }

    public String getFriendaskid() {
        return this.friendaskid;
    }

    public void setUserid(int userid) {
        this.userid = userid;
    }

    public int getUserid() {
        return this.userid;
    }

    public void setFriendid(int friendid) {
        this.friendid = friendid;
    }

    public int getFriendid() {
        return this.friendid;
    }

    public void setInvitetype(short invitetype) {
        this.invitetype = invitetype;
    }

    public short getInvitetype() {
        return this.invitetype;
    }

    public void setCreatetime(long createtime) {
        this.createtime = createtime;
    }

    public long getCreatetime() {
        return this.createtime;
    }
}
